#include <bits/stdc++.h>
// 2025/03/25
// tag: 
// Author: Forever
using namespace std;
using int64 = int64_t;

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while (t--){
        int a, b, c, d;
        cin >> a >> b >> c >> d;
        if (a == b && c == d && a == c)
            cout << "Yes" << endl;
        else    
            cout << "No" << endl;
    }
    return 0;
}